/*
*************************************
* PocketGTT
*************************************
This file is part of PocketGTT.

PocketGTT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PocketGTT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PocketGTT.  If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick 1.0


Item {



    Image {
        id: bgImg
        fillMode: Image.PreserveAspectFit
        width: parent.width
        anchors.bottom: bar.top
        height: parent.width
        opacity: 0.8
        source: "qrc:BG_01_tiny.svg"
        smooth: true
    }



    Separator {
        id: bar
        anchors.bottom: parent.bottom
        width: parent.width
        height: 8
        radius: 0

        color: myWin.theme.blue_background //"#09a7cc"
    }

    states: [
        State {
            name: "blue"
            when: !GTT.SelectMultipleStopsStatus && !myWin.statesMan.pageViewStatus
            PropertyChanges { target: bar; color: myWin.theme.blue_background}
            PropertyChanges { target: bgImg; source: "qrc:BG_01_tiny.svg"}
        },
        State {
            name: "green"
            when: GTT.SelectMultipleStopsStatus && !myWin.statesMan.pageViewStatus
            PropertyChanges { target: bar; color: myWin.theme.green_background}
            PropertyChanges { target: bgImg; source: "qrc:BG_02_tiny.svg"}
        },
        State {
            name: "violet_orange"
            when: myWin.statesMan.pageViewStatus == 1 //GTTStopInfo.resultsPage
            PropertyChanges { target: bar; color: myWin.theme.violet_background}
            PropertyChanges { target: bgImg; source: "qrc:BG_03_tiny.svg"}
        }
    ]
    transitions: [
        Transition {
            //            NumberAnimation { properties: "anchors.horizontalCenterOffset"; duration: myWin.theme.changetimeM}
            ColorAnimation { duration: myWin.theme.changetimeM }
            //            PropertyAnimation { properties: "text"; duration: 400}
        }
    ]

}
